package com.assets.room.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

import java.io.Serializable;

@Entity(tableName = "t_info_type")
public class Type implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 类别id
     */
    @ColumnInfo(name = "id")
    @PrimaryKey(autoGenerate = true)
    private Long id;

    /**
     * 分类编码
     */
    @ColumnInfo(name = "typenum")
    private String typenum;

    /**
     * 名称
     */
    @ColumnInfo(name = "name")
    private String name;

    /**
     * 备注
     */
    @ColumnInfo(name = "remark")
    private String remark;

    /**
     * 父级id
     */
    @ColumnInfo(name = "pid")
    private String pid;

    @ColumnInfo(name = "is_flag")
    private String isFlag;

    @Ignore
    public Type() {
    }


    public Type(Long id, String typenum, String name, String remark, String pid, String isFlag) {
        this.id = id;
        this.typenum = typenum;
        this.name = name;
        this.remark = remark;
        this.pid = pid;
        this.isFlag = isFlag;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTypenum() {
        return typenum;
    }

    public void setTypenum(String typenum) {
        this.typenum = typenum;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String isFlag() {
        return isFlag;
    }

    public void setFlag(String flag) {
        isFlag = flag;
    }

    @Override
    public String toString() {
        return "Type{" +
                "id=" + id +
                ", typenum='" + typenum + '\'' +
                ", name='" + name + '\'' +
                ", remark='" + remark + '\'' +
                ", pid='" + pid + '\'' +
                ", isFlag=" + isFlag +
                '}';
    }
}